<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品</title>
</head>
<body>
<div id="toolbarDemo" style="display: none">
    <div class="layui-btn-container" style="float:left">

    </div>
</div>
<script type="text/html" id="authoritiesTbBar">
</script>
<div class="layui-fluid vue-box">
    <div class="layui-card">
        <div class="layui-card-body">
            <!-- 表格工具栏 -->
            <form class="layui-form toolbar el-form">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">商品名称:</label>
                        <div class="layui-input-inline">
                            <input name="name" class="layui-input" placeholder="商品名称"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">分类名称:</label>
                        <div class="layui-input-inline">
                            <input name="classify.name" class="layui-input" placeholder="分类名称"/>
                        </div>
                    </div>
                    <div class="layui-inline">&emsp;
                        <div class="layui-btn icon-btn" @click="seachs()">
                            <i class="layui-icon">&#xe615;</i>搜索
                        </div>&nbsp;
                    </div>
                </div>
            </form>
            <!-- 数据表格 -->
            <div id="authoritiesTable"></div>
        </div>
    </div>
    <div id="admins" style="display: none;padding-right: 20px;">
        <br>
        <form class="layui-form" action="">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">分类ID</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.classify.id" name="classify.id" placeholder="分类ID" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品名称</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.name" name="name" placeholder="商品名称" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">标签</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.icon" name="icon" placeholder="icon"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">单位</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.unit" name="unit" placeholder="单位"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">市场价</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.makePrice" name="makePrice" placeholder="市场价"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">现价</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.price" name="price" placeholder="现价"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">品牌</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.brand" name="brand" placeholder="品牌"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">产地</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="that.place" name="place" placeholder="产地"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">成熟时间（秒）</label>
                        <div class="layui-input-block">
                            <input type="number" v-model="that.ripe" name="ripe" placeholder="成熟时间（秒）"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="checkbox" v-model="that.status" name="status" lay-skin="switch"
                                   lay-text="true|false">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label">商品图片</label>
                            <button type="button" class="layui-btn" id="upload">
                                上传图片
                            </button>
                        </div>
                        <div class="layui-input-block" v-for="(item,i) in that.image">
                            <br>
                            <br>
                            <img v-bind:src="item" style="width: 100px;margin: 0 auto">
                            <br>
                            <br>
                            <a @click="delNote(i)" type="button" class="layui-btn layui-btn-sm layui-btn-danger">
                                删除
                            </a>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label">图文详情</label>
                        </div>
                        <div class="layui-input-block layui-col-md10">
                            <div id="note"></div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div id="chu" style="display: none;padding-right: 20px;">
        <br>
        <form class="layui-form" action="">
            <div class="layui-row">
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">数量</label>
                        <div class="layui-input-block">
                            <input type="number" v-model="chu.number" name="number" placeholder="分类ID" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">说明</label>
                        <div class="layui-input-block">
                            <input type="text" v-model="chu.note" name="note" placeholder="说明" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript" th:src="@{/js/require.js}"></script>
<script type="text/javascript" th:src="@{/js/requireConfig.js}"></script>
<script type="text/javascript" th:src="@{/app/admin/shop/shop.js}"></script>
</body>
</html>